<template>
  <div>
    <header>
      <slot name="header">
        <h3>我是插入的header ，具名插槽</h3>
      </slot>
    </header>
    <main>
      <!-- <slot>
        <h3>我是插入的 main 的默认插槽</h3>
      </slot> -->
      <slot name="main">
        <h3>我是插入的main 的具名插槽</h3>
      </slot>
    </main>
    <footer>
      <slot name="footer" :uname="uname"></slot>
    </footer>
  </div>
</template>

<script>
export default {
  props: {
    uname: {
      type: Object,
      default: () => {
        // eslint-disable-next-line no-return-assign
        return {
          name: '祥子'
        }
      }
    }
  }
}
</script>

<style lang="scss" scoped>
</style>
